const mongoose = require('../index.js')

const {getNowTime} = require('../../utils')

const adminSchema = new mongoose.Schema({
    adminName:{
        type:String,
        // 唯一性
        unique:true,
        required:true
        // 默认值
        // default:'xxx'
    },
    password:{
        type:String,
        required:true
    },
    regTime:{
        type:String,
        required:true,
        default:getNowTime()
    },
    loginTime:{
        type:String,
        required:true,
        default:getNowTime()
    }
})

const adminListModel = mongoose.model('adminList',adminSchema,'adminList')

module.exports = adminListModel